package com.peas.fastdfs.rabbitmq;


import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

//@Component
public class OpcConsuemr {



    @RabbitListener(
            containerFactory = "localSimpleRabbitListenerContainerFactory",
            bindings = {
                    @QueueBinding(
                            value = @Queue(
                                    name = RabbitmqConstant.UPLOAD_QUEUE,
                                    arguments = {
                                         @Argument(
                                                 name = "x-dead-letter-exchange",
                                                 value = RabbitmqConstant.DLX_EXCHANGE
                                         )
                                    }
                            ),
                            exchange = @Exchange(
                                    name = RabbitmqConstant.UPLOAD_EXCHANGE,
                                    type = RabbitmqConstant.TOPIC
                            ),
                            key = {
                                   RabbitmqConstant.UPLOAD_ROUTING_KEY
                            },
                            ignoreDeclarationExceptions = "true"

                    )
            }
    )
    public void consumer(){

    }


}
